-
Notifications
You must be signed in to change notification settings - Fork 683
Update protocol version #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update protocol version #410
Conversation
* This fixes modelcontextprotocol#378 * In types.ts - set LATEST_PROTOCOL_VERSION to "2025-03-26" - add "2025-03-26" to SUPPORTED_PROTOCOL_VERSIONS * In auth.test.ts - in test "returns metadata when discovery succeeds" - expect "MCP-Protocol-Version" to be "2025-03-26"
* Added types.test.ts - "should have correct latest protocol version" - "should have correct supported protocol versions"
* tidy types.test.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this! Please can we have tests for version negotiations. Ideally we test:
- old protocol server, new client
- old protocol client, new server
It seems as if the bases are covered by the current crop of client and server tests. If you see a gap, I'm happy to close it. Server version-handling tests![]() Client version-handling tests![]() |
Those tests have loads of mocking, I think if we can just check manually if all works fine for both of the cases that would be great. |
* In src/client/index.test.ts added tests: - "should connect new client to old, supported server version" - should negotiate version when client is old, and newer server supports its version" - "should throw when client is old, and server doesn't support its version"
Fair enough. Added some straightforward mock-less tests. Have a look. |
* In src/client/index.test.ts added tests: - "should connect new client to old, supported server version" - should negotiate version when client is old, and newer server supports its version" - "should throw when client is old, and server doesn't support its version"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
Motivation and Context
StreamableHttp is available in the current release of the SDK and people are finding that returning the newest protocol version from their servers can cause a failure to connect.
How Has This Been Tested?
Unit and integration tests pass. Lint has no errors.
Breaking Changes
Nope.
Types of changes
Checklist
Additional context